package com.etoak;

import com.etoak.service.IHelloService;
import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;

/**
 * @program: ws-cxf
 * @description:
 * @author: 管浩杰
 * @create: 2021-03-17 17:35
 **/

public class CXFClient {
    public static void main(String[] args) {
        /* 创建  */
        JaxWsProxyFactoryBean factoryBean = new JaxWsProxyFactoryBean();
        factoryBean.setAddress("http://127.0.0.1:9090/hello?wsdl");
        factoryBean.setServiceClass(IHelloService.class);
        IHelloService service = (IHelloService) factoryBean.create();
        String res = service.hello("asas");
        System.out.println(res);
    }
}
